#ifndef LEVELEDITORVIEW_H
#define LEVELEDITORVIEW_H

#include "appGlobals.h"
#include <QGLWidget>
#include "openGL/orbitalcamera.h"

namespace Modes { class LevelEditorMode; }

namespace LevelModeWidgets {

class LevelEditorView : public QGLWidget
{
	Q_OBJECT

public:
	LevelEditorView(QPointer<Modes::LevelEditorMode> lem, QWidget *parent = 0);
protected:
	void initializeGL();
	void resizeGL(int width, int height);
	void paintEvent(QPaintEvent*);
	void setupViewport(int width, int height);
	void mousePressEvent(QMouseEvent *event);
	void mouseMoveEvent(QMouseEvent *event);
	void mouseReleaseEvent(QMouseEvent *event);
private:
	QPointer<Modes::LevelEditorMode> m_levelEditorMode;
	OrbitalCamera m_camera;
	QPoint m_prevMousePos;
};

} // namespace LevelModeWidgets

#endif // LEVELEDITORVIEW_H
